/**
 * 给定数组A，对每个位置i求去掉Ai以后的中位数。
 * 排序，离线
 */
#include <bits/stdc++.h>
using namespace std;

#include <bits/extc++.h>
using namespace __gnu_pbds;

using Real = long double;
using llt = long long;
using vi  =vector<int>;
using pii = pair<int, int>;

int N;
vi A, Ans;
vector<pii> B;

void procJi(){
    int a = N / 2;
    int b = a + 1;
    int mid = B[a].first + B[b].first;
    for(int i=0;i<a;++i){
        Ans[B[i].second] = mid;
    }

    a -= 1;
    mid = B[a].first + B[b].first;
    Ans[B[a + 1].second] = mid;
    
    b -= 1;
    mid = B[a].first + B[b].first;
    for(int i=b+1;i<N;++i){
        Ans[B[i].second] = mid;
    }

    for(auto i : Ans){
        cout << i / 2;
        if(i & 1) cout << ".5\n";
        else cout << ".0\n";
    }
}

void procOu(){
    int k = N / 2;
    int mid = B[k].first;
    for(int i=0;i<k;++i){
        Ans[B[i].second] = mid; 
    }
    k -= 1;
    mid = B[k].first;
    for(int i=k+1;i<N;++i){
        Ans[B[i].second] = mid; 
    }
    for(auto i : Ans) cout << i << ".0\n";
    return;
}

void proc(){
    B.assign(N, {});
    for(int i=0;i<N;++i) B[B[i].second = i].first = A[i];
    sort(B.begin(), B.end());
    Ans.assign(N, {});

    if(N & 1) procJi();
    else procOu();
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);
    int nofkase = 1;
    // cin >> nofkase;
    while(nofkase--){
        cin >> N;
        A.assign(N, {});
        for(auto & i : A) cin >> i;
        proc();
    }
    return 0;
}